package com.msoe.utils;

import com.google.gwt.user.client.rpc.IsSerializable;

public class Utilities implements IsSerializable
{
	//TODO: The database stuff should probably be in a configuration file, but for now this works.
	//DO NOT commit your settings! These fields should be empty when commiting!
	private static final String dbConnectionURL = "";
	private static final String dbUsername = "";
	private static final String dbPassword = "";
	
	public static String getConnectionURL()
	{
		if(dbConnectionURL.equals("")) throw new Error("You must set the database connection URL! See the wiki for more details: http://code.google.com/p/msoer/wiki/DatabaseSchema");
		return dbConnectionURL;
	}
	
	public static String getDatabaseUsername()
	{
		if(dbUsername.equals("")) throw new Error("You must set the database username! See the wiki for more details: http://code.google.com/p/msoer/wiki/DatabaseSchema");
		return dbUsername;
	}
	
	public static String getDatabasePassword()
	{
		if(dbPassword.equals("")) throw new Error("You must set the database password! See the wiki for more details: http://code.google.com/p/msoer/wiki/DatabaseSchema");
		return dbPassword;
	}
}
